problem on legendre polynomial